<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
        <style>
            div {
                height: 100px;
            }
            #box{
                border-bottom: solid 1px #000;
            }

            #box2{
                position: relative;
            }

            #box2::after{
                content: '';
                display: block;
                width: 100%;
                height: 1px;
                position:absolute;
                background: #000;
                bottom: 0;
                left: 0;
            }

            @media screen and (-webkit-min-device-pixel-ratio: 2) {
                #box2::after{
                    transform: scaleY(0.5);
                }
            }

            @media screen and (-webkit-min-device-pixel-ratio: 3) {
                #box2::after{
                    transform: scaleY(0.333333);
                }
            }


        </style>
    </head>
    <body>
        <div id="box"></div>

        <div id="box2"></div>
    </body>
</html>
